<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label required">HOST</label>
    <div class="layui-input-block">
        <input type="text" name="config[host]" class="layui-input" lay-verify="required" placeholder="请输入HOST" value="{$row.config.host|default=''}">
    </div>
</div>
<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label required">PORT</label>
    <div class="layui-input-block">
        <input type="text" name="config[port]" class="layui-input" lay-verify="required" placeholder="请输入PORT" value="{$row.config.port|default=''}">
    </div>
</div>
<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block">
        <input type="text" name="config[username]" class="layui-input" placeholder="请输入用户名" value="{$row.config.username|default=''}">
    </div>
</div>
<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-block">
        <input type="text" name="config[password]" class="layui-input" placeholder="请输入密码" value="{$row.config.password|default=''}">
    </div>
</div>

<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label">privateKey</label>
    <div class="layui-input-block layuimini-upload">
        <input name="config[private_key]" class="layui-input layui-col-xs6" placeholder="如果需要，上传秘钥文件" value="{$row.config.private_key|default=''}">
        <div class="layuimini-upload-btn">
            <span><a class="layui-btn" data-upload="private_key" data-upload-number="one" data-upload-exts="pem"><i class="fa fa-upload"></i> 上传</a></span>
            <span><a class="layui-btn layui-btn-normal" id="select_private_key" data-upload-select="private_key" data-upload-number="one"><i class="fa fa-list"></i> 选择</a></span>
        </div>
    </div>
</div>

<div class="layui-form-item" v-if="configType == 'sftp'">
    <label class="layui-form-label required">地址前缀</label>
    <div class="layui-input-block">
        <input type="text" name="config[root]" class="layui-input" lay-verify="required" placeholder="请输入地址前缀" value="{$row.config.root|default='/uldisk/'}">
        <tip>建议以/开头，否则目录可能会基于ssh账号发生意外变化</tip>
    </div>
</div>